package com.soulmate.auth.token;

import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;

/**
 * 微信code认证令牌
 *
 * @author huaiping
 */
public class WeiXinCodeAuthenticationToken extends AbstractGeneralAuthenticationToken {

    public WeiXinCodeAuthenticationToken(Object principal, Object credentials) {
        super(principal, credentials);
    }

    public WeiXinCodeAuthenticationToken(Object principal, Object credentials, Collection<? extends GrantedAuthority> authorities) {
        super(principal, credentials, authorities);
    }

    public static WeiXinCodeAuthenticationToken unauthenticated(Object principal, Object credentials) {
        return new WeiXinCodeAuthenticationToken(principal,credentials);
    }

    public static WeiXinCodeAuthenticationToken authenticated(Object principal, Object credentials,
                                                                         Collection<? extends GrantedAuthority> authorities) {
        return new WeiXinCodeAuthenticationToken(principal,credentials, authorities);
    }
}
